package com.qubuyer.business.home.adapter

import com.qubuyer.R
import com.qubuyer.business.home.activity.SecondGoodListActivity
import com.qubuyer.databinding.ItemHomeDailydiscountSecondBinding
import com.qubuyer.repository.entitys.HomeGoodEntity
import com.qubuyer.utils.NavigationUtil
import com.qubyer.widget.adapter.BindingRvAdapter
import java.util.*

/**
 * @date 创建时间:2019/6/4
 * @author Susong
 * @description 首页每日折扣Adapter
 * & @version
 */
class HomeDailyDiscountAdapter(dataList: ArrayList<HomeGoodEntity>) : BindingRvAdapter<HomeGoodEntity, ItemHomeDailydiscountSecondBinding>(dataList) {

    override val itemLayout: Int
        get() = R.layout.item_home_dailydiscount_second

    override fun onBind(data: HomeGoodEntity, dataBinding: ItemHomeDailydiscountSecondBinding) {
        dataBinding.host = this
        dataBinding.data = data
        dataBinding.root.setOnClickListener { NavigationUtil.overlay(mContext, SecondGoodListActivity::class.java, 6) }
    }
}